FIG. 37 shows an exemplary peripheral device of a programmable controller (hereinafter referred to as “PC”).
FIG. 37 is a configuration diagram showing the configuration of a conventional peripheral device of a PC.
In FIG. 37, numeral 1 denotes a PC. Numeral 2 denotes a PC interface (hereinafter referred to as “i/F”) section, which is connected to the PC 1. The PC i/F section 2 performs data exchange with the PC 1. Numeral 3 denotes a program transfer control section, which is connected to the PC i/F section 2. Numeral 4 denotes a program storage section, which is connected to the program transfer control section 3. Numeral 5 denotes an auxiliary storage i/F section, which is connected to the program transfer control section 3. Numeral 6 denotes an auxiliary storage device, which is connected to the auxiliary storage i/F section 5.
Numeral 7 denotes a window management section, which is connected to the program transfer control section 3 and the program storage section 4. The window management section 7 manages and controls windows that are displayed on a display 9. Numeral 8 denotes an operator i/F, which is connected to the window management section 7. Numeral 9 denotes the display, which is connected to the operator i/F 8. Numeral 10 denotes a mouse, which is connected to the operator i/F 8 and receives an input from an operator. Numeral 11 denotes a keyboard, which is connected to the operator i/F 8 and receives an input from an operator. A program for execution of a monitoring process and data in a character memory corresponding to the program are edited by an operator's manipulating the mouse 10 and the keyboard 11.
Numeral 12 denotes a program monitoring section, which is connected to the PC i/F section 2 and the window management section 7. The program monitoring section 12 extracts data relating to monitoring items from a character memory generation section 13. Further, the program monitoring section 12 causes a window on the display 9 to reflect a monitoring result that is acquired from the PC 1 via the PC i/F section 2. Numeral 13 denotes the character memory generation section, which is connected to the program monitoring section 12 and the program storage section 4. The character memory generation section 13 generates, in a character memory, character data to be used for displaying, as a ladder diagram, an execution status of a monitoring process according to programs stored in the program storage section 4 and the auxiliary storage device 6.
Numeral 14 denotes a program editing section, which is connected to the character memory generation section 13 and the program storage section 4. Numeral 15 denotes a window display control section, which is connected to the window management section 7, the program monitoring section 12, the character memory generation section 13, and the program editing section 14. Numeral 16 denotes a program monitoring window section, which has, for each arbitrary program stored in the program storage section 4, the program monitoring section 12, the character memory generation section 13, the program editing section 14, and the window display control section 15.
Numeral 17 denotes a peripheral device of the PC 1, which has the PC i/F section 2, the program transfer control section 3, the auxiliary storage device i/F section 5, the auxiliary storage device 6, the program storage section 4, the window management section 7, the operator i/F section 9, the program monitoring window section 16, the display 9, the mouse 10, and the keyboard 11. The peripheral device 17 of the PC 1 may have a plurality of program monitoring window sections 16.
Next, referring to FIG. 38, a description will be made of a display example a window display that is based on character data that is generated in the character memory of the conventional peripheral device of a PC. The character memory is part of the character memory generation section 13. Window display based on character data is performed on the display 9.
FIG. 38 shows a display example of window display that is based on character data.
In this display example of window display that is based on character data, n-row/m-column divisional regions are displayed.
Next, the data structure of character data will be described with reference to FIG. 39.
FIG. 39 is a structure diagram showing the data structure of character data.
In this data structure of character data, a total-number-of-rows data portion and row data portions of a number that is based on the number of rows recorded in the total-number-of-rows data portion are arranged in prescribed order. The data structure of each row data portion is such that a total-number-of-columns data portion and character memory data portions of a number that is based on the number of columns recorded in the total-number-of-columns data portion are arranged a prescribed order.
Next, the data structure of one character memory data to be recorded in a character memory data portion will be described with reference to FIG. 40.
FIG. 40 is a structure diagram showing the data structure of one character memory data to be recorded in each character memory data portion.
One character memory data consists of four portions: a branching symbol, a circuit symbol, an address, and an instruction code, recorded in each constituent portion a prescribed order.
Next, another display example of window display that is based on character data generated in the character memory of the conventional peripheral device of a PC will be described with reference to FIG. 41.
FIG. 41 shows another display example of window display that is based on character data.
Data relating to a window display to be made on the display 9 is generated in the character memory of the character memory generation section 13. A window display is made on the display 9 in such a manner that the window display control section 15 performs control based on the character data generated on the character memory of the character memory generation section 13.
An example of a window display to be made on the display 9 is a ladder diagram as shown in FIG. 41. Differences in output results of respective circuit symbols (X0 to X70, etc.) shown in FIG. 41 occur one after another according to a monitoring process that is based on a prescribed program. The monitoring process according to a prescribed program is executed by the PC 1. The program monitoring section 12 is activated every predetermined period by the window management section 7. The monitoring process according to a program is executed based on activation of the program monitoring section 12 by the window management section 7.
An operation for displaying a ladder diagram as shown in FIG. 41 on the display 9 will be described below with reference to FIGS. 42 to 45.
FIG. 42 is a flowchart showing a control operation of the conventional peripheral device of a PC that is performed by the program monitoring section 12 of the conventional peripheral device of a PC.
At step (hereinafter referred to as “S”) 1101, the program monitoring section 12 checks whether monitoring request data has been generated. If monitoring request data has been generated, the process goes to S1102. If no monitoring request data has been generated, the process goes to S1103.
At S1102, the program monitoring section 12 checks whether the character data has been altered. If the character data has been altered, the process goes to S1103. If the character data has not been altered, the process goes to S1105.
At S1103, the program monitoring section 12 generates monitoring request data. After completion of S1103, the process goes to S1104.
At S1104, the program monitoring section 12 transfers, to the PC 1, the monitoring request data that was generated at S1103. The monitoring request data that has been transferred to the PC 1 is registered in the PC 1. After completion of S1104, the process goes to S1105.
At S1105, the program monitoring section 12 transfers a monitoring request to the PC 1. The above monitoring request data is to register, in the PC 1, items to be monitored. On the other hand, the monitoring request is to order execution of the monitoring that relates to the items registered by using the monitoring request data. Once monitoring items are registered in the PC 1 by using monitoring request data, no monitoring request data is used again unless character data is altered in connection with, for example, alteration of monitoring items.
At S1106, the program monitoring section 12 waits for an event that monitoring result data, corresponding to the monitoring request that was transferred from the program monitoring section 12 to the PC 1 at S1105, is output from the PC 1 and input to the program monitoring section 12. If monitoring result data is input to the program monitoring section 12, the process goes to S1107. If it is not input, the program monitoring section 12 continues to wait for an input.
At S1107, the program monitoring section 12 causes, via the window display control section 15, the display 9 to reflect the monitoring result data while referring to the received monitoring result data and the character data.
The left part of FIG. 43 shows the structure of monitoring request data to be checked by the program monitoring section 12 at S1101. The left part of FIG. 43 is a structure diagram showing the data structure of monitoring request data. The monitoring request data includes a header portion, a number-of-monitoring-request-points portion, and individual device portions showing respective device locations that are based on the number of monitoring points that is recorded in the number-of-monitoring-request-points portion, arranged in a prescribed order. The header portion of the monitoring request data designates the PC 1 that executes the monitoring process, as well as a data packet type of the monitoring request data. The number-of-monitoring-request-points portion specifies the number of monitoring locations to be monitored. Each individual device portion designates a device name indicating a monitor location to be monitored.
The right part of FIG. 43 shows the structure of monitoring result data to be checked by the program monitoring section 12 at S1106. The right part of FIG. 43 is a structure diagram showing the data structure of monitoring result data. The monitoring result data includes a header portion, a number-of-monitoring-result-points portion, and individual device result portions showing individual device results at respective device locations that are based on the number of monitoring result points that is recorded in the number-of-monitoring-result-points portion, arranged in a prescribed order. The header portion of the monitoring result data specifies the PC 1 that has executed the monitoring process. The number-of-monitoring-result-points portion specifies the number of monitoring locations that have been monitored. Monitoring result data of each monitoring location that has been monitored is recorded in each individual device result portion in a prescribed data size.
Next, the left part of FIG. 44 shows a specific example of monitoring request data that is output from the program monitoring section 12 to the PC 1 to display a ladder diagram shown in FIG. 41 on the display 9. The right part of FIG. 44 shows a specific example of monitoring result data that is output from the PC 1 to the program monitoring section 12 in response to the monitoring request data shown in the left part of FIG. 44. FIG. 44 is a structure diagram showing a specific data structure of monitoring request data that is output from the program monitoring section 12 to the PC 1 and a specific data structure of monitoring result data that is output from the PC 1 to the program monitoring section 12.
Next, a monitoring request data generation process that is executed at S1103 in FIG. 42 will be described with reference to FIG. 45. FIG. 45 is a flowchart showing a monitoring request data generation process.
First, at S1201, the program monitoring section 12 initializes, to “1,” an X counter that indicates an X-coordinate position in a window display that is based on character data. This initialization can render the program monitoring section 12 in a state that it can recognize, for example, the left-end position of the window display that is based on the character data. After completion of S1201, the process goes to S1202.
At S1202, the program monitoring section 12 initializes, at “1,” a Y counter that indicates a Y-coordinate position of the window display that is based on the character data. This initialization can render the program monitoring section 12 in a state that it can recognize, for example, the top position of the window display that is based on the character data. After completion of S1202, the process goes to S1203.
At S1203, the program monitoring section 12 starts tracing in which checks are made in increasing order of the X-coordinate of the window display that is based on the character data.
The tracing means checks whether an instruction relating to an input/output device or an internal variable is set as an instruction at an arbitrary position, indicated by the X counter and the Y counter, of the window display that is based on the character data.
Examples of the input/output device are a contact, a coil indicating an output result, and an application instruction for manipulating data.
If an instruction relating to an input/output device or an internal variable is set as an instruction at the traced position, the process goes to S1204. If not, the process goes to S1206.
That is, if no instruction relating to an input/output device or an internal variable is set as an instruction at the traced position, no setting is made of monitoring request data.
At S1204, the program monitoring section 12 extracts the input/output device name or the internal variable name that is set in the instruction that was found at S1203. After completion of S1204, the process goes to S1205.
At S1205, the program monitoring section 12 sets, in the monitor request data, the input/output device name or the internal variable name that was extracted at S1204. After completion of S1205, the process goes to S1206.
At S1206, the program monitoring section 12 judges whether tracing of the X-coordinate end position for the prescribed Y-coordinate has finished. If the X-coordinate end position for the prescribed Y-coordinate has finished, the process goes to S1208. If the tracing of the end position has not been traced yet, the process goes to S1207.
At S1207, the program monitoring section 12 adds 1 to the X counter. The process then returns to step S1203 to trace the next position of the window display that is based on the character data.
At S1208, the program monitoring section 12 initializes the X counter to “1.” The process then goes to S1209.
At S1209, the program monitoring section 12 judges whether tracing of the Y-coordinate end position has finished. If the tracing of the Y-coordinate end position has finished, the execution of the series of steps is finished. If the tracing of the Y-coordinate end position has not finished yet, the process goes to S1210.
At S1210, the program monitoring section 12 adds 1 to the Y counter. The process then returns to S1203 to trace the next position of the window display that is based on the character data.
Another conventional example is a programming device of a programmable controller that is disclosed in Japanese Patent Laid-Open No. Hei. 5-241619. In the programming device of a programmable controller that is disclosed in this patent publication, execution results of programs obtained by execution of the programs by a plurality of programmable controllers are uniformly monitored by using one display device. The monitoring is performed on all contacts that are displayed on the display device.
A further conventional example is an input/output signal monitoring scheme of a PC that is disclosed in Japanese Patent Laid-Open No. Hei. 5-81205. In the input/output signal monitoring scheme of a PC that is disclosed in this publication, sampling periods are set for respective input/output signals of the PC and a high-rate monitoring process and a low-rate monitoring process are executed in accordance with the sampling periods of the input/output signals.
As described above, in the conventional peripheral devices of a programmable controller, when plural processing results of monitoring processes according to arbitrary programs are monitored by using a display of the peripheral device, all monitoring results are updated uniformly.
This results in a problem that the frequency of data communications between the PC and the peripheral device and between the peripheral device and the display increases and the updating rate of results of monitoring processes declines as the number of programs for execution of monitoring processes increases.